package com.oig.sys.base.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * @author wuxl
 */
@Setter
@Getter
@ToString
@Entity
@Table(name = "tb_hs_goods_tariff")
public class TbHsGoodsTariff implements Serializable {

	// 主键id
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", nullable = false)
	private Integer id;

	// hsCode
	@Column(name = "hs_code", length = 10)
	private String hsCode;

	// 国别代码
	@Column(name = "country_code", length = 6)
	private String countryCode;

	// 国家标准代码
	@Column(name = "country_apply_code", length = 6)
	private String countryApplyCode;

	// 国家名称
	@Column(name = "country_name", length = 128)
	private String countryName;

	// 进口关税收取方式
	@Column(name = "tariff_type")
	private String tariffType;

	// 进口关税税率
	@Column(name = "tariff_rate")
	private BigDecimal tariffRate;

//	// 增值税率--预留
//	@Column(name = "vat_rate")
//	private BigDecimal vatRate;
//
//	// 消费税税率--预留
//	@Column(name = "cmp_tax_rate")
//	private BigDecimal cmpTaxRate;
//
//	// 退税率--预留
//	@Column(name = "rebate_rate")
//	private BigDecimal rebateRate;
//
//	// 出口税率--预留
//	@Column(name = "export_rate")
//	private BigDecimal exportRate;

	// 备注说明
	@Column(name = "remark", length = 2000)
	private String remark;


	// 创建人id
	@CreatedBy
	@Column(name = "create_user_id")
	private Integer createUserId;

	// 创建人
	@Column(name = "create_user_name", length = 32)
	private String createUserName;

	// 创建时间
	@CreatedDate
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time")
	private Date createTime;

	// 更新人id
	@LastModifiedBy
	@Column(name = "last_update_id")
	private Integer lastUpdateId;

	// 更新人
	@Column(name = "last_update_name", length = 32)
	private String lastUpdateName;

	// 最后更新时间
	@LastModifiedDate
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "last_update_time")
	private Date lastUpdateTime;

	// 版本号
	@Version
	@Column(name = "version")
	private Integer version;

	@Column(name = "priority")
	private Integer priority=0;//优先级
}
